<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Home - The .NET Core ORM Cookbook</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="css/theme.css" type="text/css" />
    <link rel="stylesheet" href="css/theme_colors.css" type="text/css" />
    <link rel="stylesheet" href="css/styles/vs.css">
    <link rel="stylesheet" href="css/font-awesome.4.5.0.min.css">
</head>
<body role="document">
    <div class="grid-for-nav">
        <nav data-toggle="nav-shift" class="nav-side stickynav">
            <div class="side-nav-search">
                <a href="index.htm"><i class="fa fa-home"></i> The .NET Core ORM Cookbook</a>
                <div role="search">
                    <form id="search-form" class="form" action="Docnet_search.htm" method="get">
                        <input type="text" name="q" placeholder="Search docs" />
                    </form>
                </div>
            </div>
            <div class="menu menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="tocentry"><a href="index.htm">Home</a>
</li>

<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="ORMs.htm">ORMs</a></span>
</li>
<li class="tocentry"><a href="FAQ.htm">FAQ</a>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="StandardCRUDscenarios.htm">Standard CRUD scenarios</a></span>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Fetchingdatascenarios.htm">Fetching data scenarios</a></span>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Advancedscenarios.htm">Advanced scenarios</a></span>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Sortingscenarios.htm">Sorting scenarios</a></span>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Storedprocedurescenarios.htm">Stored procedure scenarios</a></span>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Auditingandhistoryscenarios.htm">Auditing and history scenarios</a></span>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Multi-Tenancyscenarios.htm">Multi-Tenancy scenarios</a></span>
</li>
<li class="tocentry">
<span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="UnknownDatabasescenarios.htm">Unknown Database scenarios</a></span>
</li>
</ul>
				<div class="toc-footer">
					<span class="text-small">
						<hr/>
						<a href="https://github.com/FransBouma/DocNet" target="_blank">Made with <i class="fa fa-github"></i> DocNet</a>
					</span>
				</div>	
			</div>
            &nbsp;
        </nav>
        <section data-toggle="nav-shift" class="nav-content-wrap">
            <nav class="nav-top" role="navigation" aria-label="top navigation">
                <i data-toggle="nav-top" class="fa fa-bars"></i>
                <a href="index.htm">The .NET Core ORM Cookbook</a>
            </nav>
            <div class="nav-content">
                <div role="navigation" aria-label="breadcrumbs navigation">
                    <div class="breadcrumbs">
<ul><li><a href="index.htm">Home</a></li></ul>
					
                    </div>
                    <hr />
                </div>
                <div role="main">
                    <div class="section">
<h1 id="the-.net-core-orm-cookbook">The .NET Core ORM Cookbook<a class="headerlink" href="#the-.net-core-orm-cookbook" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h1>
<p>In October of 2016, InfoQ published a series of articles on the repository pattern in .NET. To illustrate the concepts three ORMs were demonstrated:  Entity Framework, Dapper, and Chain. </p>
<p>A criticism of the articles was that it didn’t include many people’s favorite ORM. So as a follow up, this GitHub repository was created to expand on that idea and create a shared “cookbook” of design patterns for any or all of the .NET ORMs. Contributions are welcome.</p>
<p>In December of 2019, the ORM Cookbook project was revived with an emphasis on modern, production grade programming. This means that each example must take into consideration these factors:</p>
<ul>
<li>Exception handling</li>
<li>.NET Core Support</li>
<li>C# 8 Nullable Reference Types</li>
<li>Static Code Analysis (e.g. FxCopAnalyzers)</li>
</ul>
<p>When contributing recipes, please keep in mind the best practices for the ORM you are working with as novices may be using the code without fully understanding it. </p>
<h3 id="original-infoq-articles">Original InfoQ Articles<a class="headerlink" href="#original-infoq-articles" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h3>
<ul>
<li><a href="https://www.infoq.com/articles/repository-implementation-strategies" target="_blank">Implementation Strategies for the Repository Pattern with Entity Framework, Dapper, and Chain</a></li>
<li><a href="https://www.infoq.com/articles/repository-advanced" target="_blank">Advanced Use Cases for the Repository Pattern in .NET</a></li>
</ul>
<h2 id="presentation">Presentation<a class="headerlink" href="#presentation" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h2>
<p><a href="https://github.com/Grauenwolf/DotNet-ORM-Cookbook" target="_blank">The ORM Cookbook Repository</a></p>
<p>Each ORM is presented as its own xUnit test project. The actual recipes are in the Models and Repositories folder. </p>
<p>To ensure each ORM is &quot;playing by the rules&quot;, a shared set of tests will be used. The tests are arranged into &quot;scenario&quot; classes. Each ORM can opt in for a given scenario by inheriting from the appropriate class. This can be done multiple times if the ORM wishes to demonstrate alternate patterns.</p>
<p>Each scenario has a matching markdown file in which the code samples can be added along with any relevant explanations. When possible, use <a href="http://defrancea.github.io/Projbook/" target="_blank">Projbook</a> notation to inline code samples. This will prevent the code samples from getting out of sync with the documentation.</p>
<p>If you build the “Documentation” project, the cookbook will be compiled as a website. </p>

                    </div>
                </div>
                <footer>
                    <hr />
                    <div role="contentinfo">
The ORM Cookbook. <a href='https://github.com/Grauenwolf/DotNet-ORM-Cookbook' target='_blank'>Visit us at GitHub</a>.
                    </div>
                </footer>
            </div>
        </section>
    </div>
    <script src="js/jquery-2.1.1.min.js"></script>
    <script src="js/modernizr-2.8.3.min.js"></script>
    <script src="js/highlight.pack.js"></script>
    <script src="js/theme.js"></script>

</body>
</html>
